package com.zyz.base.enums;

import lombok.Getter;
import lombok.Setter;

/**
 * @author wangjinliang
 */
public enum ResponseCodeEnum {

    UNKNOWN_ERROR(-1, "未知错误"),

    SUCCESS(200, "成功"),

    INVALID_PARAM(400, "参数错误"),

    FORBIDDEN(403, "无权限"),

    RESOURCE_NOT_FOUNT(404, "资源找不到"),

    CALL_TIME_OUT_ERROR(500, "微服务调用超时"),

    BUSINESS_ERROR(600, "业务错误"),
    ;

    @Setter
    @Getter
    private int code;

    @Setter
    @Getter
    private String message;

    ResponseCodeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
